package main

import "fmt"

func main() {
	var code = "L fdph, L vdz, L frqtxhuhg"

	var code2 = "Hola Estación Espacial Internacional"

	fmt.Printf("%s\n", decode(code))
	fmt.Printf("%s", encodeSpa(code2))
}

func decode(code string) string {

	var ans string

	for _, c := range code {
		var char rune
		if c >= 'A' && c <= 'z' {
			char = c - 3
		} else {
			char = c
		}
		ans += string(char)
	}

	return ans
}

func encodeSpa(code string) string {
	var ans string

	for _, c := range code {
		var char rune
		// fmt.Printf("%c %d %d\n", c, c, len(string(c)))

		if c >= 'A' && c <= 'z' {
			char = c - 13
		} else {
			char = c
		}
		ans += string(char)
	}

	return ans
}
